module.exports = {
  publicPath: '/capp',
  devServer: {
    proxy: {
      '/api': {
        target: 'http://47.114.190.170:8083/',
        // target: 'http://192.168.106.214:9002/', // 辉煌
        // target: 'http://192.168.1.37:9002', // 辉煌
        // target: 'http://192.168.1.9:9002', // 欧阳
        // target: 'http://192.168.1.62:9002/', // 英宇
        // target: 'http://hnbin.natapp1.cc',
        // target: 'https://hnbin.mynatapp.cc/',
        ws: true,
        changeOrigin: true,
        pathRewrite: {
          '^/api': '/'
        }
      },
      // 上传图片跨域配置
      '/imgCrossDomain': {
        target: 'https://chezhuapp.oss-cn-beijing.aliyuncs.com/image/',
        changeOrigin: true,
        pathRewrite: {
          '^/imgCrossDomain': '/'
        }
      },
      /* // 获取公网 IP地址跨域配置
       '/myIpAddress': {
        target: 'http://pv.sohu.com/cityjson',
        changeOrigin: true,
        pathRewrite: {
          '^/myIpAddress': '/'
        }
      }, */

    },
    // 自定义端口号
    port: 9099,
    // 解决穿透报错  =>  webpack-dev-server disableHostCheck导致 invalid host header
    disableHostCheck: true
  },
  // 去掉打包出来后的.map文件
  productionSourceMap: false
}
